﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Profile.aspx.vb" Inherits="_14073716_Prototype.Profile" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
        <br />
        <div style="float:left; width:207px; height: 1309px;">
        <asp:FormView ID="FormView1" runat="server" BackColor="LightGoldenrodYellow" 
            BorderColor="Tan" BorderWidth="1px" CellPadding="2" DataKeyNames="ID" 
            DataSourceID="SqlDataSource1" ForeColor="Black">
            <EditItemTemplate>
                ID:
                <asp:Label ID="IDLabel1" runat="server" Text='<%# Eval("ID") %>' />
                <br />
                FirstName:
                <asp:TextBox ID="FirstNameTextBox" runat="server" 
                    Text='<%# Bind("FirstName") %>' />
                <br />
                LastName:
                <asp:TextBox ID="LastNameTextBox" runat="server" 
                    Text='<%# Bind("LastName") %>' />
                <br />
                Gender:
                <asp:TextBox ID="GenderTextBox" runat="server" Text='<%# Bind("Gender") %>' />
                <br />
                EmailAddress:
                <asp:TextBox ID="EmailAddressTextBox" runat="server" 
                    Text='<%# Bind("EmailAddress") %>' />
                <br />
                Description:
                <asp:TextBox ID="DescriptionTextBox" runat="server" 
                    Text='<%# Bind("Description") %>' />
                <br />
                Picture:
                <asp:TextBox ID="PictureTextBox" runat="server" Text='<%# Bind("Picture") %>' />
                <br />
                TravellerName:
                <asp:TextBox ID="TravellerNameTextBox" runat="server" 
                    Text='<%# Bind("TravellerName") %>' />
                <br />
                <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" 
                    CommandName="Update" Text="更新" />
                &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" 
                    CausesValidation="False" CommandName="Cancel" Text="取消" />
            </EditItemTemplate>
            <EditRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
            <FooterStyle BackColor="Tan" />
            <HeaderStyle BackColor="Tan" Font-Bold="True" />
            <InsertItemTemplate>
                FirstName:
                <asp:TextBox ID="FirstNameTextBox" runat="server" 
                    Text='<%# Bind("FirstName") %>' />
                <br />
                LastName:
                <asp:TextBox ID="LastNameTextBox" runat="server" 
                    Text='<%# Bind("LastName") %>' />
                <br />
                Gender:
                <asp:TextBox ID="GenderTextBox" runat="server" Text='<%# Bind("Gender") %>' />
                <br />
                EmailAddress:
                <asp:TextBox ID="EmailAddressTextBox" runat="server" 
                    Text='<%# Bind("EmailAddress") %>' />
                <br />
                Description:
                <asp:TextBox ID="DescriptionTextBox" runat="server" 
                    Text='<%# Bind("Description") %>' />
                <br />
                Picture:
                <asp:TextBox ID="PictureTextBox" runat="server" Text='<%# Bind("Picture") %>' />
                <br />
                TravellerName:
                <asp:TextBox ID="TravellerNameTextBox" runat="server" 
                    Text='<%# Bind("TravellerName") %>' />
                <br />
                <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" 
                    CommandName="Insert" Text="插入" />
                &nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" 
                    CausesValidation="False" CommandName="Cancel" Text="取消" />
            </InsertItemTemplate>
            <ItemTemplate>
                <asp:Image ID="Image1" runat="server" Height="200px" 
                    ImageUrl='<%# Eval("Picture", "{0}") %>' Width="200px" />
                <br />
                <br />
                FirstName:
                <br />
                <asp:Label ID="FirstNameLabel" runat="server" Font-Size="20pt" 
                    ForeColor="#FF6600" Text='<%# Bind("FirstName") %>' />
                <br />
                <br />
                <br />
                LastName:
                <br />
                <asp:Label ID="LastNameLabel" runat="server" Text='<%# Bind("LastName") %>' 
                    Font-Size="20pt" 
                    ForeColor="#FF6600"/>
                <br />
                <br />
                <br />
                Gender:
                <br />
                <asp:Label ID="GenderLabel" runat="server" Text='<%# Bind("Gender") %>' Font-Size="20pt" 
                    ForeColor="#FF6600"/>
                <br />
                <br />
                <br />
                EmailAddress:
                <br />
                <asp:Label ID="EmailAddressLabel" runat="server" 
                    Text='<%# Bind("EmailAddress") %>' Font-Size="20pt" 
                    ForeColor="#FF6600"/>
                <br />
                <br />
                <br />
                Description:
                <br />
                <asp:Label ID="DescriptionLabel" runat="server" 
                    Text='<%# Bind("Description") %>' Font-Size="20pt" 
                    ForeColor="#FF6600"/>
                <br />
                <br />
                <br />
                <br />
                <br />
                TravellerName:
                <br />
                <asp:Label ID="TravellerNameLabel" runat="server" 
                    Text='<%# Bind("TravellerName") %>' Font-Size="20pt" 
                    ForeColor="#FF6600"/>
                <br />
                <br />
            </ItemTemplate>
            <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" 
                HorizontalAlign="Center" />
        </asp:FormView>
        &nbsp;<br />
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ChineseFoodConn %>" 
            ProviderName="<%$ ConnectionStrings:ChineseFoodConn.ProviderName %>" 
            SelectCommand="SELECT * FROM [Profiles] WHERE ([TravellerName] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="TravellerName" QueryStringField="TravellerName" 
                    Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
        <br />
        <br />
        <asp:Button ID="btn_EditProfile" runat="server" 
            PostBackUrl="~/EditProfile.aspx" Text="Edit Profile" Height="50px" 
            Width="207px" />
            <br />
            <br />
            <br />
            <asp:Button ID="btn_SeeVIP" runat="server" Text=" See VIP page" 
                PostBackUrl="~/Statistics.aspx" Height="50px" Width="207px" />
            <br />
            <br />
            <br />
            <asp:Label ID="label_VIP" runat="server" Font-Size="Medium" ForeColor="#FF6600" 
                
                
                
                Text="A VIP user can see a VIP button here .  If you want to become a VIP, please submit at least 1 comment. If you finished comment, but still can't see the VIP button, please log out and log in again, and then you can become a VIP user and see the VIP button"></asp:Label>
            <br />
            <br />
            <br />
            <br />
        </div>
        <div style="float:left; width:664px; height: 949px; margin-left: 26px;">
            <asp:Label ID="label_ILikeFood" runat="server" Font-Size="Large" ForeColor="#FF6600" 
                Text="I Liked Food:"></asp:Label>
            <br />
            <br />
            <asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSource2" 
                GroupItemCount="4">
                <AlternatingItemTemplate>
                    <td runat="server" style="background-color:#FFF8DC;">
                        <asp:ImageButton ID="ImageButton1" runat="server" Height="150px" 
                            ImageUrl='<%# Eval("Picture", "{0}") %>' 
                            PostBackUrl='<%# Eval("ID", "ChineseFoodDetail.aspx?ID={0}") %>' 
                            Width="150px" />
                        <br />
                    </td>
                </AlternatingItemTemplate>
                <EditItemTemplate>
                    <td runat="server" style="background-color:#008A8C;color: #FFFFFF;">
                        ID:
                        <asp:Label ID="IDLabel1" runat="server" Text='<%# Eval("ID") %>' />
                        <br />ChineseFoodName_English:
                        <asp:TextBox ID="ChineseFoodName_EnglishTextBox" runat="server" 
                            Text='<%# Bind("ChineseFoodName_English") %>' />
                        <br />Picture:
                        <asp:TextBox ID="PictureTextBox" runat="server" Text='<%# Bind("Picture") %>' />
                        <br />Reader:
                        <asp:TextBox ID="ReaderTextBox" runat="server" Text='<%# Bind("Reader") %>' />
                        <br />
                        <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="更新" />
                        <br />
                        <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="取消" />
                        <br />
                    </td>
                </EditItemTemplate>
                <EmptyDataTemplate>
                    <table runat="server" 
                        style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;">
                        <tr>
                            <td>
                                No food there...
                            </td>
                        </tr>
                    </table>
                </EmptyDataTemplate>
                <EmptyItemTemplate>
<td runat="server" />
                </EmptyItemTemplate>
                <GroupTemplate>
                    <tr ID="itemPlaceholderContainer" runat="server">
                        <td ID="itemPlaceholder" runat="server">
                        </td>
                    </tr>
                </GroupTemplate>
                <InsertItemTemplate>
                    <td runat="server" style="">
                        ChineseFoodName_English:
                        <asp:TextBox ID="ChineseFoodName_EnglishTextBox" runat="server" 
                            Text='<%# Bind("ChineseFoodName_English") %>' />
                        <br />Picture:
                        <asp:TextBox ID="PictureTextBox" runat="server" Text='<%# Bind("Picture") %>' />
                        <br />Reader:
                        <asp:TextBox ID="ReaderTextBox" runat="server" Text='<%# Bind("Reader") %>' />
                        <br />
                        <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="插入" />
                        <br />
                        <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="清除" />
                        <br />
                    </td>
                </InsertItemTemplate>
                <ItemTemplate>
                    <td runat="server" style="background-color:#DCDCDC; color: #000000;">
                        <asp:ImageButton ID="ImageButton2" runat="server" Height="150px" 
                            ImageUrl='<%# Eval("Picture", "{0}") %>' 
                            PostBackUrl='<%# Eval("ID", "ChineseFoodDetail.aspx?ID={0}") %>' 
                            Width="150px" />
                        <br />
                    </td>
                </ItemTemplate>
                <LayoutTemplate>
                    <table runat="server">
                        <tr runat="server">
                            <td runat="server">
                                <table ID="groupPlaceholderContainer" runat="server" border="1" 
                                    
                                    
                                    style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;font-family: Verdana, Arial, Helvetica, sans-serif;">
                                    <tr ID="groupPlaceholder" runat="server">
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr runat="server">
                            <td runat="server" 
                                style="text-align: center;background-color: #CCCCCC;font-family: Verdana, Arial, Helvetica, sans-serif;color: #000000;">
                                <asp:DataPager ID="DataPager1" runat="server" PageSize="12">
                                    <Fields>
                                        <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" 
                                            ShowLastPageButton="True" />
                                    </Fields>
                                </asp:DataPager>
                            </td>
                        </tr>
                    </table>
                </LayoutTemplate>
                <SelectedItemTemplate>
                    <td runat="server" 
                        style="background-color:#008A8C;font-weight: bold;color: #FFFFFF;">
                        ID:
                        <asp:Label ID="IDLabel" runat="server" Text='<%# Eval("ID") %>' />
                        <br />ChineseFoodName_English:
                        <asp:Label ID="ChineseFoodName_EnglishLabel" runat="server" 
                            Text='<%# Eval("ChineseFoodName_English") %>' />
                        <br />Picture:
                        <asp:Label ID="PictureLabel" runat="server" Text='<%# Eval("Picture") %>' />
                        <br />Reader:
                        <asp:Label ID="ReaderLabel" runat="server" Text='<%# Eval("Reader") %>' />
                        <br />
                    </td>
                </SelectedItemTemplate>
            </asp:ListView>
            <br />
            <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                ConnectionString="<%$ ConnectionStrings:ChineseFoodConn %>" 
                ProviderName="<%$ ConnectionStrings:ChineseFoodConn.ProviderName %>" 
                SelectCommand="SELECT * FROM [WhoLikesWhat] WHERE ([Reader] = ?)">
                <SelectParameters>
                    <asp:QueryStringParameter Name="Reader" QueryStringField="TravellerName" 
                        Type="String" />
                </SelectParameters>
            </asp:SqlDataSource>
        </div>
    </asp:Content>
